/**
 * Copyright &copy; 2015-2020 <a href="http://www.easyhis.com/">easyhis</a> All rights reserved.
 */
package com.easy.dfcshop.entity;

import com.easy.common.utils.excel.annotation.ExcelField;
import com.easy.core.persistence.DataEntity;
import com.easy.modules.sys.entity.User;
import com.fasterxml.jackson.annotation.JsonFormat;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 商品关联Entity
 * @author waylen chi
 * @version 2018-01-17
 */
public class ProductLink extends DataEntity<ProductLink> {
	
	private static final long serialVersionUID = 1L;
	private Integer productId;		// 商品ID
	private Integer linkId;		// 被关联的商品ID
	private String isDouble;		// 是否是双向关联：0-否 1-是
	private User createBy;		// 添加此关联的用户ID
	private Date createTime;		// 关联时间
	
	public ProductLink() {
		super();
	}


	@NotNull(message="商品ID不能为空")
	@ExcelField(title="商品ID", align=2, sort=0)
	public Integer getProductId() {
		return productId;
	}

	public void setProductId(Integer productId) {
		this.productId = productId;
	}
	
	@ExcelField(title="被关联的商品ID", align=2, sort=1)
	public Integer getLinkId() {
		return linkId;
	}

	public void setLinkId(Integer linkId) {
		this.linkId = linkId;
	}
	
	@ExcelField(title="是否是双向关联：0-否 1-是", align=2, sort=2)
	public String getIsDouble() {
		return isDouble;
	}

	public void setIsDouble(String isDouble) {
		this.isDouble = isDouble;
	}
	
	@ExcelField(title="添加此关联的用户ID", align=2, sort=3)
	public User getCreateBy() {
		return createBy;
	}

	public void setCreateBy(User createBy) {
		this.createBy = createBy;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="关联时间", align=2, sort=4)
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
}